<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>标题</title> 
<link href="./css/ionic.css" rel="stylesheet"> 
<script src="./js/ionic.bundle.min.js"></script>
</head>
<body ng-app="myApp" ng-controller="actionsheetCtl" >
	<ion-pane>
	    <ion-content >
	        <ion-refresher pulling-text="下拉刷新" on-refresh="doRefresh()"></ion-refresher>
	        <ion-list>
	            <ion-item ng-repeat="item in items" ng-bind="item.name"></ion-item>
	        </ion-list>
	    </ion-content>
	</ion-pane>
</body>
<script type="text/javascript">
var myApp = angular.module("myApp",["ionic"]);
myApp.run(function($ionicPlatform){
	$ionicPlatform.ready(function(){
		if(window.cordova && window.cordova.plugins.Keyboard) {
			cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
		}
		if(window.StatusBar) {
			StatusBar.styleDefault();
		}
	});
});
myApp.controller( 'actionsheetCtl',['$scope','$timeout' ,'$http',function($scope,$timeout,$http){
	$scope.items = [
		{"name":"HTML5"},
		{"name":"JavaScript"},
		{"name":"Css3"}
	];
	$scope.doRefresh = function(){
		$timeout(function(){
			$scope.itemss = [
				{'name':'赵子龙'},
				{'name':'张飞'},
				{'name':'关羽'}
			];
			$scope.items = $scope.items.concat($scope.itemss);
			$scope.$broadcast('scroll.refreshComplete');
		},1000);
		// $http.get('http://www.runoob.com/try/demo_source/item.json')
		// .success(function(newItems) {
		// 	$scope.items = newItems;
		// })
		// .finally(function() {
		// 	$scope.$broadcast('scroll.refreshComplete');
		// });
	};
}]);
</script>
</html>
